import http from '@/utils/http'

//加入购物车
//goodsId 商品id count商品数量 blessing祝福语
export const reqAddCart = ({ goodsId, count, ...data }) => {
  return http.get(`/cart/addToCart/${goodsId}/${count}`, data)
}

//购物车列表
export const reqCartList = () => {
  return http.get('/cart/getCartList')
}

//更新购物车 勾选状态
//isCheck 0不需要勾选 1需要勾选
export const reqUpdateCart = (goodsId, isChecked) => {
  return http.get(`/cart/checkCart/${goodsId}/${isChecked}`)
}

//全选与全不选
// 0取消全选  1全选
export const reqCheckAllStatus = (isChecked) => {
  return http.get(`/cart/checkAllCart/${isChecked}`)
}

//删除购物车商品
export const reqDelCArtGoods = (goodsId) => {
  return http.get(`/cart/delete/${goodsId}`)
}
